import React, { Component } from 'react';
import {HashRouter as Router,Route} from "react-router-dom"

// 导入组件 
import Index from "./components/index/Index"
import Cart from "./components/cart/Cart"
import My from "./components/my/My"
import Category from "./components/category/Category"
import Tabbar from "./components/tabbar/Tabbar"
import Search from './components/search/Search'
import GoodDetail from "./components/goodDetail/GoodDetail"
import GoodList from "./components/goodList/GoodList"

class RouterConfig extends Component {
    render() {
        return (
         <Router>
             <Route path="/" exact render={()=><Tabbar><Index></Index></Tabbar>}></Route>
             <Route path="/cart" exact render={()=><Tabbar><Cart></Cart></Tabbar>}></Route>
             <Route path="/my" exact render={()=><Tabbar><My></My></Tabbar>}></Route>
             <Route path="/category" exact render={(...props)=><Tabbar><Category {...props}></Category></Tabbar>}></Route>
             <Route path="/search" exact render={()=><Search></Search>}></Route>
             <Route path="/goodDetail/:goods_id" exact render={(props)=><GoodDetail {...props}></GoodDetail>}></Route>
             <Route path="/goodList/:query" exact render={(props)=><GoodList {...props}></GoodList>}></Route>
         </Router>
        );
    }
}

export default RouterConfig;
